<?php

namespace app\common\model;

use app\extra\BaseModel;

class Subject extends BaseModel
{
    public function setAddedField(&$item){
        // $item['public_desc'] = \app\extra\DBCont::getPublishStatus($item['publish']);

        $item['major_num'] = model('major')->where('category_id', $item['id'])->count();
    }
}
